<?php
/*
 * @author : Colin Hom
 * @description: index view for subjects
 */
use_helper('Subject', 'Pagination');
slot('coursesNav', 'active'); 
?>
<style>
	ul#subjects li {
		float:left;
		margin-left: 15px;
		padding: 10px;
		width: 200px;
	}
</style>
<div class="courses" id="wrapper">
	<?php include_partial('global/systemMessages') ?>
	<div id="content">
		<div id="main">
			<div class="main-heading">
				<?php if(isset($network_id) && $network_id):?>
				<h4><?php echo "All ".UserPeer::$networks[$network_id]." Subjects" ?></h4>
				<?php else: ?>
				<h4><?php echo "All Subjects" ?></h4>
				<?php endif ?>
			</div>
			<div style="width:900px; text-align: left;">
				<ul id="subjects">
				<?php foreach($subject_list as $key => $subject): ?>
					<li style="<?php echo $key%3 == 0 ? 'clear:left' : '' ?>"><?php echo render_subject_title_link($subject) ?></li>
				<?php endforeach ?>
				</ul>	
			</div>
			
			<div style="clear: both; text-align: right;">
				<hr/>
				<?php if(isset($network_id) && $network_id):?>
					<?php echo pager_navigation($subjects_pager, 'subjects/index?network_id='.$network_id ) ?>
				<?php else: ?>	
					<?php echo pager_navigation($subjects_pager, 'subjects/index' ) ?>
				<?php endif ?>
			</div>
		</div>
		<div id="sidebar">
			<?php if($sf_user->isAuthenticated()): ?>
				<?php include_component('groups', 'list')?>
			<?php endif ?>
		</div>
	</div>
</div>